﻿using BLL.Interceptor;
using Castle.MicroKernel.Registration;

namespace BLL.Installer
{
    public class DBContextInstaller : IWindsorInstaller
    {
        public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
        {
            container.Register(
                            AllTypes
                            .FromThisAssembly()
                            .InNamespace("BLL.DbAccess")
                            .LifestyleTransient()
                            .Configure(c => c.Interceptors<ExceptionInterceptor>())
                            );
        }

    }
}
